package com.xjlsoft.weather.enums;

/**
 * 结果码枚举
 *
 */
public enum ResultStausEnum {

    SUCCESS("1", "调用接口查询成功"),
    FAILE("-1","调用接口查询失败"), 
    TIMEOUT("3","本次调用接口超时"),
    ZERO("0","截止到昨天历史数据查询完毕,保存查询记录"),
	TWO("2","无新数据需要请求（上次统计查询日期为最新日期）,保存查询记录") ;




    private final String value;

    private final String message;

    ResultStausEnum(String value, String message) {
        this.value = value;
        this.message = message;
    }

    public String getValue() {
        return value;
    }

    public String getMessage() {
        return message;
    }

    public static String valueof(String value) {
        for (ResultStausEnum e : ResultStausEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getMessage();
            }
        }
        return null;
    }
    }
